﻿namespace Xms.Abp.Components;

public class NDateTimeColumn : Column<DateTime?>
{
    public NDateTimeColumn()
    {
        Format = "yyyy-MM-dd HH:mm:ss";
        Width = "150";
        ChildContent = builder =>
        {
            if (Field.HasValue)
            {
                builder.AddContent(0, Field.Value.ToString(Format));
            }
            else
            {
                builder.AddContent(0, "-");
            }
        };
    }
}
